﻿Public Class VScrollBarEx
    Sub New()
        ' 此调用是 Windows 窗体设计器所必需的。
        InitializeComponent()
        ' 在 InitializeComponent() 调用之后添加任何初始化。
        '不知道如何屏蔽滚动条的键盘时间，暂时把滚动条设置为不可获得焦点的样式
        SetStyle(Windows.Forms.ControlStyles.Selectable, False)
        Me.Maximum = 1
        Me.Minimum = 1
        Me.Value = 1
    End Sub
    Public IsInfoToChange As Boolean
    ''' <summary>
    ''' 改变滚动条状态
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub ChangeScroll()
        Me.Maximum = ExDocument.MaxDisplayLineNumber
        If Me.Value <> FirstVisiableLineNumber Then
            IsInfoToChange = True
            Me.Value = FirstVisiableLineNumber
            IsInfoToChange = False
        End If
        Me.SmallChange = VisibleLines / 20
        Me.LargeChange = VisibleLines / 10
    End Sub
End Class
